def gen_func():
    # 1.可以产出值，2.可以接收值（调用方传递进来的值）
    # yield 1
    try:
        yield "http://projectedu.com"
    except GeneratorExit:
        pass
    yield 2
    yield 3
    return "bobby"

if __name__ == '__main__':
    gen = gen_func()
    print(next(gen))
    gen.close()
    print("12")

    # GeneratorExit 是继承BaseException,不是Exception

